/*
 * ImagenesHelper.java
 *
 * Created on 26 de septiembre de 2006, 17:16
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package com.src.computec.mensajesalertas.alertas.helper;

import com.src.computec.mensajesalertas.base.helper.BaseHelper;
import com.src.computec.mensajesalertas.alertas.dao.BaseAlertasDAO;
import com.src.computec.mensajesalertas.alertas.dto.AlertaDto;
import com.src.computec.mensajesalertas.alertas.exception.AlertasException;
import java.util.List;


/**
 *
 * @author root
 */
public class AlertasHelper extends BaseHelper
{
    
    /** Creates a new instance of CargueHelper */
    public AlertasHelper() {
    }
    
    public List getAlertasActivas(AlertaDto dto) throws AlertasException {
        try {
            BaseAlertasDAO dao = (BaseAlertasDAO) this.getFactoryDAO().getAlertasDAO();
            return dao.getAlertasActivas(dto);
        }
        catch (Exception e) {
            throw new AlertasException("AlertasHelper:getAlertasActivas: " + e.toString());
        }
    }
    
    public void eliminarAlertas(List alertasEliminadas) throws AlertasException {
        try {
            BaseAlertasDAO dao = (BaseAlertasDAO) this.getFactoryDAO().getAlertasDAO();
            dao.eliminarAlertas(alertasEliminadas);
        }
        catch (Exception e) {
            throw new AlertasException("AlertasHelper:eliminarAlertas: " + e.toString());
        }
    }
}
